import request from '@/config/axios'

// 文章分类 VO
export interface ArticleCategroyVO {
  id: number // 文章分类编号
  name: string // 分类名称
  picUrl: string // 图标地址
}

// 文章分类 API
export const ArticleCategroyApi = {
  // 查询文章分类分页
  getArticleCategroyPage: async (params: any) => {
    return await request.get({ url: `/circ/article-categroy/page`, params })
  },

  // 查询文章分类详情
  getArticleCategroy: async (id: number) => {
    return await request.get({ url: `/circ/article-categroy/get?id=` + id })
  },

  // 新增文章分类
  createArticleCategroy: async (data: ArticleCategroyVO) => {
    return await request.post({ url: `/circ/article-categroy/create`, data })
  },

  // 修改文章分类
  updateArticleCategroy: async (data: ArticleCategroyVO) => {
    return await request.put({ url: `/circ/article-categroy/update`, data })
  },

  // 删除文章分类
  deleteArticleCategroy: async (id: number) => {
    return await request.delete({ url: `/circ/article-categroy/delete?id=` + id })
  },

  // 导出文章分类 Excel
  exportArticleCategroy: async (params) => {
    return await request.download({ url: `/circ/article-categroy/export-excel`, params })
  },
  getSimpleArticleCategroyList: async () => {
    return await request.get({ url: `/circ/article-categroy/list-all-simple` })
  }

}


